<template>
    <div class="category">
        <h2>{{ title }} 分类</h2>
        <!--定义一个插槽（挖个坑,等着组件的使用者进行填充)-->
        <slot>默认值</slot>
    </div>
</template>

<script>
export default {
    name: "CategoryList",
    props: ['title']
}
</script>

<style scoped>
.category {
    background-color: #00afff;
    width: 200px;
    height: 300px;
}

h2 {
    background-color: #C03639;
    text-align: center;
}

</style>